package com.jd.tank;

/**
 * @program: MyTank
 * @description:
 * @author: 王术平
 * @create: 2020-11-25 23:35
 **/
public class Main {
    public static void main(String[] args) {
        TankFrame tf = new TankFrame();

        int initTankCount = Integer.parseInt((String)PropertyMgr.get("initTankCount"));

        for(int i=0; i<initTankCount; i++) {
//            tf.tanks.add(new Tank(50 + i*80, 200, Direction.DOWN, Group.BAD, tf,true));
            tf.tanks.add(tf.bf.createTank(50 + i*80, 200, Direction.DOWN, Group.BAD, tf,true));
        }
        //music
        new Thread(()->new Audio("audio/war1.wav").loop()).start();

        new Thread(()-> {
            while(true) {
                try {
                    Thread.sleep(25);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                tf.repaint();
            }
        }).start();

    }
}
